package cn.iocoder.yudao.module.peizhen.controller.app.notice;

import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;

import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;

import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;

import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;

import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;

import cn.iocoder.yudao.module.peizhen.controller.app.notice.vo.*;
import cn.iocoder.yudao.module.peizhen.dal.dataobject.notice.NoticePeiZhenDO;
import cn.iocoder.yudao.module.peizhen.service.notice.NoticePeiZhenService;

@Tag(name = "用户 APP - 通知")
@RestController
@RequestMapping("/peizhen/notice-pei-zhen")
@Validated
public class AppNoticePeiZhenController {

    @Resource
    private NoticePeiZhenService noticePeiZhenService;


    @GetMapping("/page")
    @Operation(summary = "获得通知分页")
    public CommonResult<PageResult<AppNoticePeiZhenRespVO>> getNoticePeiZhenPage(@Valid AppNoticePeiZhenPageReqVO pageReqVO) {
        PageResult<NoticePeiZhenDO> pageResult = noticePeiZhenService.getNoticePeiZhenPage(pageReqVO);
        return success(BeanUtils.toBean(pageResult, AppNoticePeiZhenRespVO.class));
    }



}